import request from './request'

//获取验证码
export function sendCheckCode(mobile) {
	return request({
		'url': '/getMwMobileCode/' + mobile,
		headers: {
			isToken: false
		},
		'method': 'get'
	})
}


//登录
export function mnLogin(data) {
	return request({
		'url': '/getCodeToken',
		method: 'post',
		headers: {
			isToken: false
		},
		'data': data
	})
}

//获取用户信息
export function getUserInfo(data) {
	return request({
		'url': '/getInfo',
		'method': 'get'
	})
}

//商家---订单列表
export function listMerchant(query) {
	return request({
		url: '/business/oilOrder/listMerchant',
		method: 'get',
		params: query
	})
}

//商家---待核销总金额
export function totalAmountVerified(query) {
	return request({
		url: '/business/oilOrder/totalAmountVerified',
		method: 'get',
		params: query
	})
}

// 商家---获取订单详细信息
export function detailsMerchant(id) {
	return request({
		url: '/business/oilOrder/detailsMerchant/' + id,
		method: 'get'
	})
}

//商家---首页上半部分卡片
export function upperHalfCard(query) {
	return request({
		url: '/business/oilOrder/upperHalfCard',
		method: 'get',
		params: query
	})
}

//商家---首页下半部分图表
export function lowerPartChart(query) {
	return request({
		url: '/business/oilOrder/lowerPartChart',
		method: 'get',
		params: query
	})
}

//商家---审核退款
export function checkRefund(query) {
	return request({
		url: '/business/oilOrder/checkRefund',
		method: 'get',
		params: query
	})
}

//商家---扫核销码拿详情
export function confirmVerificationDetails(data) {
	return request({
		url: '/business/oilOrder/confirmVerificationDetails',
		method: 'post',
		data: data
	})
}

//商家---确认核销
export function confirmVerification(data) {
	return request({
		url: '/business/oilOrder/confirmVerification',
		method: 'post',
		data: data
	})
}

// 根据字典类型查询字典数据信息
export function getDicts(dictType) {
	return request({
		url: '/system/dict/data/type/' + dictType,
		method: 'get'
	})
}

//小程序新增油站
export function addStation(data) {
	return request({
		url: '/business/station/addStation',
		method: 'post',
		data: data
	})
}

//修改油站
export function editStation(data) {
	return request({
		url: '/business/station',
		method: 'put',
		data: data
	})
}

//新增油站企业资质
export function addCompany(data) {
	return request({
		url: '/business/company',
		method: 'post',
		data: data
	})
}

//修改油站企业资质
export function editCompany(data) {
	return request({
		url: '/business/company',
		method: 'put',
		data: data
	})
}

// 获取油站详细信息
export function detailsStation(id) {
	return request({
		url: '/business/station/' + id,
		method: 'get'
	})
}

//添加员工
export function addStaff(data) {
	return request({
		url: '/business/station/addStaff',
		method: 'post',
		data: data
	})
}
//小程序权限分配
export function zpermission(data) {
	return request({
		url: '/business/station/permission',
		method: 'post',
		data: data
	})
}
//修改员工
export function editStaff(data) {
	return request({
		url: '/business/station/editStaff',
		method: 'put',
		data: data
	})
}
//删除员工
export function deleteStaff(query) {
	return request({
		url: '/business/station/deleteStaff',
		method: 'get',
		params: query
	})
}
//查询员工列表
export function staffList() {
	return request({
		url: '/business/station/staffList',
		method: 'get',
	})
}
//查询员工详情
export function staffDetail(query) {
	return request({
		url: '/business/station/staffDetail',
		method: 'get',
		params: query
	})
}